import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException, InvalidIpAddressException, InvalidMaskLengthException, SplitSubnetException, InvalidPortNumberException {
        EchoServer server = new EchoServer();

        server.setPort(666);

        System.out.println("Listening on port:" + server.getPort());
        server.start();


        /*Network net = new Network("192.168.120.0", 24);
        System.out.println(net.getMask());
        System.out.println(net);
        System.out.println(net.getFirstUsableAddress());
        System.out.println(net.getBroadcastAddress());
        System.out.println(net.getLastUsableAddress());
        System.out.println(net.contains("192.168.120.1"));
        System.out.println(net.getTotalHosts());
        for ( Network n : net.getSubnets() ) {
            System.out.println(n);
        }
        System.out.println(net.isPublic());  */


        /*IPv4Address ip = new IPv4Address("10.101.2.22");
        System.out.println(ip.getIntAddress());
        System.out.println(ip);
        IPv4Address ip2 = new IPv4Address(-1);
        System.out.println(ip2.getIntAddress());
        System.out.println(ip2);*/
    }
}
